#include <boost/python.hpp>
#include <OpenSG/OSGColor.h>


namespace
{

template<typename T>
boost::python::tuple Color3_getValuesRGB_tuple(osg::Color3<T>* color)
{
   typename osg::Color3<T>::ValueType r, g, b;
   color->getValuesRGB(r, g, b);
   return boost::python::make_tuple(r, g, b);
}

template<typename T>
boost::python::tuple Color4_getValuesRGBA_tuple(osg::Color4<T>* color)
{
   typename osg::Color4<T>::ValueType r, g, b, a;
   color->getValuesRGBA(r, g, b, a);
   return boost::python::make_tuple(r, g, b, a);
}

template<typename T>
boost::python::tuple Color_getValuesHSV(T* color)
{
   osg::Real32 h, s, v;
   color->getValuesHSV(h, s, v);
   return boost::python::make_tuple(h, s, v);
}

// Instantiations of the above functions.
template boost::python::tuple Color3_getValuesRGB_tuple(osg::Color3<osg::Real32>*);
template boost::python::tuple Color3_getValuesRGB_tuple(osg::Color3<osg::UInt8>*);
template boost::python::tuple Color_getValuesHSV(osg::Color3<osg::Real32>*);
template boost::python::tuple Color_getValuesHSV(osg::Color3<osg::UInt8>*);

template boost::python::tuple Color4_getValuesRGBA_tuple(osg::Color4<osg::Real32>*);
template boost::python::tuple Color4_getValuesRGBA_tuple(osg::Color4<osg::UInt8>*);
template boost::python::tuple Color_getValuesHSV(osg::Color4<osg::Real32>*);
template boost::python::tuple Color_getValuesHSV(osg::Color4<osg::UInt8>*);

}
